package com.example.firstjavamqtt.model.device;


import com.example.firstjavamqtt.Constants.DeviceTypeConstants;
import com.example.firstjavamqtt.model.base.Device;
import lombok.*;
import org.springframework.stereotype.Component;

@EqualsAndHashCode(callSuper = true)
@Data
@Component
public class Led extends Device {
    //闪烁速度
    private int speed;
    //是否单独点亮(注意 没点亮的时候可以开启流水灯模式)
    private int isOn;
    //是否开启流水灯模式
    private int isStreamLedOn;

    {
        super.setDeviceType(DeviceTypeConstants.SIMPLE_LED);
    }

    @Override
    public String toString() {
        return "Led{" +
                "deviceId=" + deviceId +
                ", deviceType='" + deviceType + '\'' +
                ", registerDate=" + registerDate +
                ", lastOnlineDate=" + lastOnlineDate +
                ", online=" + online +
                ", speed=" + speed +
                ", isOn=" + isOn +
                ", isStreamLedOn=" + isStreamLedOn +
                '}';
    }
}
